package ecweb.dao;

import java.util.List;

import ecweb.dal.DatabaseSession;
import ecweb.domain.Order;
import ecweb.domain.OrderState;
import ecweb.exception.DatabaseException;

public interface IOrderDao {

	Order getOrderById(DatabaseSession dbses, long id)
			throws DatabaseException;
	
	List<Order> getOrders(DatabaseSession dbses,
			long userIdFilter,
			OrderState stateFilter,
			long limitStart, long limitLength)
					throws DatabaseException;
	
	long getOrdersCount(DatabaseSession dbses,
			long userIdFilter,
			OrderState stateFilter)
					throws DatabaseException;
	
	boolean updateOrderById(DatabaseSession dbses, Order order)
			throws DatabaseException;
	
	void addOrder(DatabaseSession dbses, Order order)
			throws DatabaseException;
	
	boolean deleteOrderById(DatabaseSession dbses, long id)
			throws DatabaseException;
}
